const http = require("http");

http.createServer((req, res) => {
    let str = "";
    req.on("data", (chunk) => {
        str += chunk
    })
    req.on("end", () => {
        res.end(str);
        // console.log(str)
    })
}).listen(3000);

console.log("server is listening 3000")